package test1230am;

public class Test09 {
    public static void main(String[] args) {

        // (9)求数组元素平均值
        int[] arr = {1,2,3,4,5};
        int sum = 0;
        for(int i = 0; i <arr.length ; i++){
            sum += arr[i];
        }
        double avg = sum/arr.length;
        System.out.println(avg);

    }
}
